package io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * IO:Input和Output,即：输入和输出
 *
 * java将输入和输出用"流Stream"表达，分为输入流和输出流。
 */
public class FOSDemo {
    public static void main(String[] args) throws IOException {
        File file = new File("fos.dat");
        FileOutputStream fos = new FileOutputStream(file);
        //FileOutputStream fos = new FileOutputStream("fos.dat");
        fos.write(1);
        fos.write(2);
        fos.write(256);
        System.out.println("写出完毕!");
        fos.close();
    }
}
